package com.anytrek.cloudopenfeign.openfeign;

import com.anytrek.cloudcommon.utils.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "cloud-commodity",path = "/commodity")
public interface CommodityClient {

    @GetMapping("/getPriceByCommodityId")
    ApiResult getPriceByCommodityId(@RequestParam("commodityId") Integer commodityId);

    @GetMapping("/deductStock")
    ApiResult deductStock(@RequestParam("commodityId") Integer commodityId, @RequestParam("count") Integer count);
}